<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="调账单作废" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<script language="javascript">
	function doCancel(){
		parent.ClosePop();
	}
	function doDisabled(id){
		window.location = "/system/CancelReasonNew.ihtm?id="+id+"&cancel_type=adjust";
	}
	function doInit(){
	}
</script>
</head>
<body oncontextmenu="return false"  onload="doInit();" class="sheet modal-dialog" style=" padding-top:10px;">
<div class="sheet-main" id="bodyDiv" style="width:860px;">
  <div class="sheet-list" style="width:100%">
    <div class="modal-main search-business">
    	<div style="width:100%;">
    	<table border="0" cellspacing="0" cellpadding="0" align="center" class="table-0">
			<tr>
				<td style="width:33%" rowspan="2"></td>
				<td style="width:33%;text-align:center" rowspan="2"><h2>调账单作废</h2></td>
				<td style="width:34%" class="tr">
					编号：${record.adjustBill.billCode}
				</td>
			</tr>
			<tr>
				<td class="tr">调账日期：<fmt:formatDate value="${record.adjustBill.adjustDate}" pattern="yyyy-MM-dd"/></td>
			</tr>
		</table>
		
		<table border="0" cellspacing="0" cellpadding="0" align="center" class="table-0">
		    <tr>
				<td class="InfoTitleDivider"></td>
			</tr>
		</table>
		
		<table border="0" cellspacing="0" cellpadding="0" align="center" class="table-0">
			<tr>
		      	<th style="width:10%">调账单位：</th>
		      	<td style="width:23%">${record.clientName}</td>
		      	<th style="width:10%">调账金额：</th>
		     	<td style="width:23%">${record.adjustBill.cost}</td>
		    	<td class="tr" style="width:34%">
		    		调账类型：
		    		<c:if test="${record.adjustBill.adjustType=='COLLECT_ADD'}">应收款增加</c:if>
					<c:if test="${record.adjustBill.adjustType=='COLLECT_ABATE'}">应收款减少</c:if>
					<c:if test="${record.adjustBill.adjustType=='PAY_ADD'}">采购付款金额增加</c:if>
					<c:if test="${record.adjustBill.adjustType=='PAY_ABATE'}">采购付款金额减少</c:if>
					<c:if test="${record.adjustBill.adjustType=='PUR_BACK_ADD'}">采购退货金额增加</c:if>
					<c:if test="${record.adjustBill.adjustType=='PUR_BACK_ABATE'}">采购退货金额减少</c:if>
					<c:if test="${record.adjustBill.adjustType=='COO_ADD'}">外协金额增加</c:if>
					<c:if test="${record.adjustBill.adjustType=='COO_ABATE'}">外协金额减少</c:if>
		    	</td>
		    </tr>
		</table>
		
		<table border="0" cellspacing="0" cellpadding="0" align="center" class="table-0">
		    <tr>
				<td class="InfoTitleDivider"></td>
			</tr>
		</table>
		
		<div class="table-list">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" id="itemTbl" >
				<tbody id="itemRowTbl">
				<tr>
					<th width="20%">单号</th>
					<th width="20%">日期</th>
					<th width="20%">金额（元）</th>
					<th width="20%">余额（元）</th>
					<th width="20%">本次调账</th>
				</tr>
				<c:forEach var="item" items="${record.items}" varStatus="i">
				<tr>
					<td >${item.businessBillCode}</td>
					<td ><fmt:formatDate value="${item.orderDate}" pattern="yyyy-MM-dd"/></td>
					<td ><commonTag:parseBigDecimal source="${item.totalCost}" /></td>
					<td ><commonTag:parseBigDecimal source="${item.remainCost}" /></td>
					<td ><commonTag:parseBigDecimal source="${item.thisCost}" /></td>
				</tr>
				</c:forEach>
				</tbody>
			</table>
		</div>
		
		<table border="0" cellspacing="0" cellpadding="0" align="center" class="table-0">
		    <tr>
				<td class="InfoTitleDivider"></td>
			</tr>
		</table>
		
		<table border="0" cellspacing="0" cellpadding="0" align="center" class="table-a2 BillElseInfo">
			<tr>
				<th>经办人：</th>
				<td >${record.adjustBill.managerName}</td>
				<th>部门：</th>
				<td >${record.departmentName}</td>
				<th>&nbsp;</th>
		      	<td >&nbsp;</td>
			</tr>
			<tr>
				<th>摘要：</th>
				<td colspan="5">${record.adjustBill.description}</td>
			</tr>
			<tr>
				<th>备注：</th>
				<td colspan="5">${record.adjustBill.mark}</td>
			</tr>
		</table>

		<div class="blank12">&nbsp;</div>		
        <p class="give">
        	<span>开单人：${record.adjustBill.createrName} <c:if test="${record.adjustBill.createTime!=null}"><fmt:formatDate value="${record.adjustBill.createTime}" pattern="yyyy-MM-dd HH:mm"/></c:if></span>
        	<span>审核人：<c:if test="${record.adjustBill.examinerId!=0}">${record.adjustBill.examinerName} <c:if test="${record.adjustBill.examineTime!=null}"><fmt:formatDate value="${record.adjustBill.examineTime}" pattern="yyyy-MM-dd HH:mm"/></c:if></c:if></span>
        	<span>单据帐套：${record.tallySetName}</span>   	
         </p>
         </div>
	   </div>
  	</div>
	<div class="modal-buttom">
			<input type="button" class="buttom-a" value=" 作 废 " onClick="doDisabled('${record.adjustBill.id}');">
			<input type="button" class="buttom-a" value=" 退 出 " onClick="doCancel();">
	</div>
</div>
</body>
</html>